﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using BLL;

namespace WebApplication2
{
    public partial class ADD : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                
            }
        }

       

        protected void Button1_Click(object sender, EventArgs e)
        {
            student model = new student();
            model.sno = Convert.ToInt32(txt_sno.Text);
            model.password = txt_pwd.Text;
            model.name = txt_name.Text;
            model.age = txt_age.Text;
            model.sex = RadioButtonList1.SelectedValue;
            model.birthtime = txt_bir.Text;
            model.addres = txt_add.Text;
            model.classes = txt_class.Text;
            model.tel = txt_tel.Text;
            model.zhuanye = txt_zhuanye.Text;
            model.graduation = txt_qk.Text;
            if (studentBLL.addstuinfo(model)>0)
            {
                Response.Write("<script>alert('添加成功')</script>");
                
            }
            else
            {
                Response.Write("<script>alert('添加失败')</script>");
            }


        }
    }
}